{% extends 'app/appbase.html' %}
{% load static %}

{% block title %}标签{% endblock %}

{% block leftside %}
<div class="ui one stackable raised cards">
    {% for article in articles %}
    <div class="card">
        <a class="content" href="/app/article?id={{ article.id }}">
            <div class="header">
                <span>{{ article.title }}</span>
                {% for tag in article.show_tags %}
                <span class="right floated ui {% ifequal tag.id selected_tag.id %}orange{% else %}teal{% endifequal %} tag label" href="/app/tag?id={{ tag.id }}">{{ tag.name }}</span>
                {% endfor %}
            </div>
            <div class="meta">
                <span><i class="write icon"></i>{{ article.author }}</span>
                <span><i class="calendar icon"></i>{{ article.add_time }}</span>
            </div>
            <div class="description">
                {{ article.description }}
            </div>
        </a>
        <div class="extra content">
            分类：
            {% for category in article.show_categories %}
            <span>
                <a class="ui {% ifequal category.id selected_category.id %}orange{% else %}teal{% endifequal %} basic label" href="/app/category?id={{ category.id }}">{{ category.name }}</a>
            </span>
            {% endfor %}
            <span class="right floated">
                阅读次数：{{ article.read_num }}
            </span>
        </div>
    </div>
    {% endfor %}
</div>
{% endblock %}

{% block js %}
<script src="{% static 'js/app/index.js' %}"></script>
{% endblock %}
